<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>"读购想"网上书店管理系统</title>
	<link rel="stylesheet" href="/static/cms/layui/css/layui.css" media="all">
	<link rel="stylesheet" href="/static/cms/css/index/app.css" media="all">
</head>

<body>
<div class="layui-layout layui-layout-admin kit-layout-admin">
	<div class="layui-header">
		<div class="layui-logo">"读购想"网上书店管理系统</div>
		<ul class="layui-nav layui-layout-right kit-nav">
			<li class="layui-nav-item">
				<a href="javascript:;">欢迎您 , ${member.nickName }</a>
				<dl class="layui-nav-child">
					<dd><a href="javascript:;">基本资料</a></dd>
					<dd><a href="javascript:;">安全设置</a></dd>
					<dd><a data-method="changePassword" class="password" href="#">修改密码</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item"><a href="logout.do"><i class="fa fa-sign-out" aria-hidden="true"></i> 注销</a></li>
		</ul>
	</div>

	<div class="layui-side layui-bg-black kit-side">
		<div class="layui-side-scroll">
			<div class="kit-side-fold">菜单<i class="layui-icon">&#xe65b;</i></div>
			<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
			<ul class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
				<%--<#if menus?? && menus?size != 0>--%>
				<c:if test="${not empty menus && fn:length(menus) != 0} " >
					<%--<#list menus as menu>--%>
					<c:forEach items="${menus}" var="menu">
						<li class="layui-nav-item">
							<a class="" href="javascript:;"><i class="fa fa-plug" aria-hidden="true"></i><span>${menu.name }</span></a>
							<#if menu.children?? && menu.children?size != 0>
								<dl class="layui-nav-child">
									<#list menu.children as child>
										<dd>
											<a style="margin-left: 15px;" href="javascript:;" kit-target data-options="{url:'${child.path }?bizCode=${child.code }', icon:'' , title:'${child.name }', id:'${child.id }'}">
											<span>${child.name }</span></a>
										</dd>
									</#list>
								</dl>
							</#if>
						</li>
					</c:forEach>
					<%--</#list>--%>
				</c:if>
				<%--</#if>--%>
			</ul>
		</div>
	</div>
	<div class="layui-body" id="container">
		<!-- 内容主体区域 -->
	</div>
</div>
<script src="/static/cms/layui/layui.js"></script>
<script src="/static/common/jquery-3.1.1.min.js"></script>
<script>
	var message;
	layui.config({
		base: '/resource/js/index/'
	}).use(['app', 'message'], function() {
		var app = layui.app,
				$ = layui.jquery,
				layer = layui.layer;
		//将message设置为全局以便子页面调用
		message = layui.message;
		//主入口
		app.set({
			type: 'iframe'
		}).init();
	});
	//修改密码
	layui.use('layer', function() {
		var layer = layui.layer;
		var active = {
			changePassword: function() {
				//$.post('/admin/vipuser/v_changePassword.do', {}, function(data) {
					layer.open({
						type: 2,
						title: '修改密码',
						area: ['400px', '300px'],
						content: '/admin/vipuser/v_changePassword.do',
						zIndex: 999 //重点1：层级
					});
				//});
			}
		}
		//为按钮注入事件
		$('.password').on('click', function() {
			var $othis = $(this), $method = $othis.data('method');
			active[$method] ? active[$method].call(this, $othis) : '';
		});
	});
</script>
</body>
</html>